Passed
Push — main ( 5111c8...0b2f70 )
by Andrii
02:45
created

ts.test.ts ➔ check1   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
export {}
2
3
it("`in string` vs `:string`", () => {
4
  type In = {[k in string]: boolean}
5
  type Colon = {[k: string]: boolean}
6
  
7
  function check1(_: {some: boolean}) {}
8
  function checkR<K extends string>(_: {[k in K]: boolean}) {}
9
  function checkC(_: {[k: string]: boolean}) {}
10
11
  const input1: In = {}, input2: Colon = {}
12
  //@ts-expect-error
13
  check1(input1)
14
  //@ts-expect-error
15
  check1(input2)
16
  checkR(input1)
17
  checkR(input2)
18
  checkC(input1)
19
  checkC(input2)
20
21
})